<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>监视器</title>

</head>
<body>
<div id="app">

    <input type="text" v-model="message">
    {{message}}
</div>

</body>
<script src="../../../lib/vue.global.js"></script>
<script>
    /**
     * 应对异步请求
     * */


      const app={
           data(){
                 return{
                     message:'hello'
                 }
           },
          watch:{
                message:function (newVal,oldVal) {
                    alert('changed');
                    console.log("old:"+oldVal);
                    console.log("new"+newVal);
                }
          }
      }

      Vue.createApp(app).mount('#app');

</script>
</html>